import request from '@/server'

// 获得产品列表
export const getProductListApi = () => {
  return request.get({
    url: '/admin/product/getProductListAndDetail'
  })
}

// 增加产品信息
export const addProductApi = (data: any) => {
  return request.post({
    url: '/admin/product/addProduct',
    data
  })
}

// 删除产品信息
export const deleteProductApi = (id: any) => {
  return request.post({
    url: '/admin/product/deleteProduct?id=' + id
  })
}

// 修改产品信息
export const updateProductApi = (data: any) => {
  return request.post({
    url: '/admin/product/updateProduct',
    data
  })
}
